home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 January / CHIP_CD_2005-01.iso / service / winamp / files / winamp505_strata.exe / $R0 / Winamp Modern / beatvisualization.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2004-07-01  |  9KB  |  289 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global ConfigAttribute ConfigAttribute17;
  6. Global ConfigAttribute ConfigAttribute18;
  7. Global ConfigAttribute ConfigAttribute19;
  8. Global ConfigAttribute ConfigAttribute20;
  9. Global ConfigAttribute ConfigAttribute21;
  10. Global ConfigAttribute ConfigAttribute22;
  11. Global ConfigAttribute ConfigAttribute23;
  12. Global ConfigAttribute ConfigAttribute24;
  13. Global ConfigAttribute ConfigAttribute25;
  14. Global ConfigAttribute ConfigAttribute26;
  15. Global ConfigAttribute ConfigAttribute27;
  16. Global ConfigAttribute ConfigAttribute28;
  17. Global ConfigAttribute ConfigAttribute29;
  18. Global ConfigAttribute ConfigAttribute30;
  19. Global ConfigAttribute ConfigAttribute31;
  20. Global ConfigAttribute ConfigAttribute32;
  21. Global ConfigAttribute ConfigAttribute33;
  22. Global ConfigAttribute ConfigAttribute34;
  23. Global ConfigAttribute ConfigAttribute35;
  24. Global ConfigAttribute ConfigAttribute36;
  25. Global ConfigAttribute ConfigAttribute37;
  26. Global ConfigAttribute ConfigAttribute38;
  27. Global ConfigAttribute ConfigAttribute39;
  28. Global ConfigAttribute ConfigAttribute40;
  29. Global ConfigAttribute ConfigAttribute41;
  30. Global ConfigAttribute ConfigAttribute42;
  31. Global ConfigAttribute ConfigAttribute43;
  32. Global Group Group116;
  33. Global Group Group117;
  34. Global Layer Layer118;
  35. Global Layer Layer119;
  36. Global Layer Layer120;
  37. Global Layer Layer121;
  38. Global Layer Layer122;
  39. Global Timer Timer123;
  40. Global AnimatedLayer AnimatedLayer124;
  41. Global AnimatedLayer AnimatedLayer125;
  42. Global Int Int126;
  43. Global Int Int127;
  44. Global Button Button128;
  45. Global Button Button129;
  46. Global Int Int130;
  47.  
  48. Function func242();
  49. Function func2178();
  50.  
  51. func242()
  52. {
  53. ConfigItem ConfigItem67;
  54. ConfigAttribute ConfigAttribute73;
  55. ConfigAttribute ConfigAttribute77;
  56. ConfigAttribute ConfigAttribute84;
  57. ConfigItem ConfigItem55;
  58. ConfigItem ConfigItem49;
  59. ConfigAttribute ConfigAttribute74;
  60. ConfigItem ConfigItem64;
  61. ConfigItem ConfigItem58;
  62. ConfigItem ConfigItem52;
  63. ConfigItem ConfigItem46;
  64. ConfigAttribute ConfigAttribute72;
  65. ConfigAttribute ConfigAttribute79;
  66. ConfigItem ConfigItem69;
  67. ConfigAttribute ConfigAttribute78;
  68. ConfigAttribute ConfigAttribute75;
  69. ConfigItem ConfigItem61;
  70. ConfigItem ConfigItem71;
  71. ConfigItem46 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  72. ConfigItem49 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  73. ConfigItem52 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  74. ConfigItem55 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  75. ConfigItem58 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  76. ConfigItem61 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  77. ConfigItem64 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  78. ConfigItem67 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
  79. ConfigItem69 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
  80. ConfigItem71 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
  81. ConfigAttribute72 = ConfigItem69.newAttribute(( "Winamp\ Modern"), ( ""));
  82. ConfigAttribute72.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  83. ConfigAttribute73 = ConfigItem46.newAttribute(( "Drawers"), ( ""));
  84. ConfigAttribute73.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  85. ConfigAttribute74 = ConfigItem46.newAttribute(( "Menus"), ( ""));
  86. ConfigAttribute74.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  87. ConfigAttribute75 = ConfigItem46.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
  88. ConfigAttribute75.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  89. ConfigAttribute77 = ConfigItem46.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
  90. ConfigAttribute77.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  91. ConfigAttribute78 = ConfigItem46.newAttribute(( "Notifications"), ( ""));
  92. ConfigAttribute78.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  93. ConfigAttribute79 = ConfigItem46.newAttribute(( "Songticker"), ( ""));
  94. ConfigAttribute79.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  95. ConfigAttribute17 = ConfigItem49.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
  96. ConfigAttribute18 = ConfigItem49.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
  97. ConfigAttribute84 = ConfigItem49.newAttribute(( "sep1"), ( ""));
  98. ConfigAttribute84.setData(( "\-"));
  99. ConfigAttribute21 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
  100. ConfigAttribute22 = ConfigItem49.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
  101. ConfigAttribute23 = ConfigItem49.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
  102. if(( ConfigAttribute21.getData() == ( "1"))) {
  103. ConfigAttribute21.onDataChanged();
  104. } else {
  105. ConfigAttribute22.onDataChanged();
  106. }
  107. ConfigAttribute25 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
  108. ConfigAttribute26 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
  109. ConfigAttribute27 = ConfigItem52.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
  110. ConfigAttribute84 = ConfigItem46.newAttribute(( "sep1"), ( ""));
  111. ConfigAttribute84.setData(( "\-"));
  112. ConfigAttribute19 = ConfigItem46.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
  113. ConfigAttribute20 = ConfigItem46.newAttribute(( "Detach\ Video\ Window"), ( "0"));
  114. ConfigAttribute24 = ConfigItem71.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
  115. ConfigAttribute84 = ConfigItem46.newAttribute(( "sep2"), ( ""));
  116. ConfigAttribute84.setData(( "\-"));
  117. ConfigAttribute31 = ConfigItem46.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
  118. ConfigAttribute28 = ConfigItem55.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
  119. ConfigAttribute29 = ConfigItem55.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
  120. ConfigAttribute30 = ConfigItem55.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
  121. ConfigAttribute33 = ConfigItem58.newAttribute(( "Open\ Context\ Menu"), ( "1"));
  122. ConfigAttribute32 = ConfigItem58.newAttribute(( "Open\ Configuration"), ( "0"));
  123. ConfigAttribute36 = ConfigItem61.newAttribute(( "Show\ always"), ( "0"));
  124. ConfigAttribute35 = ConfigItem61.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
  125. ConfigAttribute34 = ConfigItem61.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
  126. ConfigAttribute37 = ConfigItem61.newAttribute(( "Never\ show"), ( "1"));
  127. ConfigAttribute84 = ConfigItem61.newAttribute(( "sep1"), ( ""));
  128. ConfigAttribute84.setData(( "\-"));
  129. ConfigAttribute41 = ConfigItem61.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
  130. ConfigAttribute38 = ConfigItem67.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
  131. ConfigAttribute39 = ConfigItem67.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
  132. ConfigAttribute40 = ConfigItem67.newAttribute(( "Notifications\ display\ time"), ( "2000"));
  133. ConfigAttribute42 = ConfigItem64.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
  134. ConfigAttribute43 = ConfigItem64.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
  135. return Null;
  136. }
  137.  
  138. System.onScriptLoaded()
  139. {
  140. func242();
  141. Group116 = System.getScriptGroup();
  142. Group117 = Group116.findObject(( "player\.normal\.display\.beatvisualization"));
  143. Layer118 = Group116.findObject(( "beatdisplayoverlay"));
  144. AnimatedLayer124 = Group116.findObject(( "beatleft"));
  145. AnimatedLayer125 = Group116.findObject(( "beatright"));
  146. Button128 = Group116.findObject(( "beatvisualization"));
  147. Button129 = Group116.findObject(( "beatvisualization2"));
  148. Layer119 = Group116.findObject(( "display\.right"));
  149. Layer120 = Group116.findObject(( "display\.right\.overlay2"));
  150. Layer121 = Group116.findObject(( "display\.st\.right"));
  151. Layer122 = Group116.findObject(( "visualization\.overlay"));
  152. Int126 = 0;
  153. Int127 = 0;
  154. Timer123 = ( new Timer);
  155. Timer123.setDelay(10);
  156. return Null;
  157. }
  158.  
  159. System.onScriptUnloading()
  160. {
  161. delete Timer123;
  162. return Null;
  163. }
  164.  
  165. func2178()
  166. {
  167. Int Int152;
  168. Int Int142;
  169. Int142 = Group116.getWidth();
  170. if(( ( Int142 % 2) != 0)) {
  171. Layer119.setXmlParam(( "image"), ( "player\.display\.right"));
  172. Layer120.setXmlParam(( "image"), ( "player\.display\.right"));
  173. Layer121.setXmlParam(( "image"), ( "player\.display\.songticker\.bg\.right"));
  174. Layer122.setXmlParam(( "image"), ( "player\.visualization\.overlay"));
  175. } else {
  176. Layer119.setXmlParam(( "image"), ( "player\.display\.right2"));
  177. Layer120.setXmlParam(( "image"), ( "player\.display\.right2"));
  178. Layer121.setXmlParam(( "image"), ( "player\.display\.songticker\.bg\.right2"));
  179. Layer122.setXmlParam(( "image"), ( "player\.visualization\.overlay2"));
  180. }
  181. if(( Int142 < 480)) {
  182. Int152 = ( ( Int142 - 60) / 2);
  183. Group117.setXmlParam(( "x"), System.integerToString(Int152));
  184. Group117.show();
  185. if(( ConfigAttribute31.getData() == ( "1"))) {
  186. Timer123.stop();
  187. Timer123.start();
  188. } else {
  189. Timer123.stop();
  190. AnimatedLayer124.gotoFrame(0);
  191. AnimatedLayer125.gotoFrame(0);
  192. }
  193. } else {
  194. Group117.hide();
  195. Timer123.stop();
  196. }
  197. return Null;
  198. }
  199.  
  200. Group116.onResize(int x, int y, int w, int h)
  201. {
  202. func2178();
  203. return Null;
  204. }
  205.  
  206. Timer123.onTimer()
  207. {
  208. Int Int159;
  209. Int Int161;
  210. Int Int158;
  211. Int Int162;
  212. Int158 = System.getLeftVuMeter();
  213. Int159 = System.getRightVuMeter();
  214. Int161 = ( Int158 / 16);
  215. Int162 = ( Int159 / 16);
  216. if(( Int161 < 14)) {
  217. Int161 = 14;
  218. }
  219. if(( Int162 < 14)) {
  220. Int162 = 14;
  221. }
  222. if(( Int161 > Int126)) {
  223. Int161 = ( Int126 - 1);
  224. if(( Int161 > 0)) {
  225. Int161 = 0;
  226. }
  227. }
  228. if(( Int162 > Int127)) {
  229. Int162 = ( Int127 - 1);
  230. if(( Int162 > 0)) {
  231. Int162 = 0;
  232. }
  233. }
  234. Int126 = Int161;
  235. Int127 = Int162;
  236. AnimatedLayer124.gotoFrame(Int161);
  237. AnimatedLayer125.gotoFrame(Int162);
  238. return Null;
  239. }
  240.  
  241. ConfigAttribute31.onDataChanged()
  242. {
  243. func2178();
  244. return Null;
  245. }
  246.  
  247. System.onKeyDown(String key)
  248. {
  249. if(( key == ( "shift\+ctrl\+alt"))) {
  250. Int130 = 1;
  251. complete;
  252. } else {
  253. Int130 = 0;
  254. }
  255. return Null;
  256. }
  257.  
  258. Button128.onLeftClick()
  259. {
  260. if(( ConfigAttribute31.getData() == ( "1"))) {
  261. ConfigAttribute31.setData(( "0"));
  262. } else {
  263. ConfigAttribute31.setData(( "1"));
  264. }
  265. return Null;
  266. }
  267.  
  268. Button129.onActivate(int activated)
  269. {
  270. if(( ! Int130)) {
  271. Button128.leftClick();
  272. return Null;
  273. }
  274. Timer123.stop();
  275. if(activated) {
  276. AnimatedLayer124.setXmlParam(( "image"), ( "player\.display\.beat\.left2"));
  277. AnimatedLayer125.setXmlParam(( "image"), ( "player\.display\.beat\.right2"));
  278. Layer118.hide();
  279. } else {
  280. AnimatedLayer124.setXmlParam(( "image"), ( "player\.display\.beat\.left"));
  281. AnimatedLayer125.setXmlParam(( "image"), ( "player\.display\.beat\.right"));
  282. Layer118.show();
  283. }
  284. func2178();
  285. return Null;
  286. }
  287.  
  288.  
  289.